<style type="text/css">
	/* .page-header .left{
		width: calc(100% - 220px);
	}
	@media only screen and (max-width: 479px) and (min-width: 320px) {
		.page-header .left{
			width: 100%;
		}
	} */
</style>
<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['车辆定位管理','车辆状态[客户]']" icon="fa fa-car" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<sa-widgets-grid>
		<div class="s_table">
			<div sa-widget [editbutton]="false" color="darken" class="clearfix">
				<header><span class="widget-icon"> <i class="fa fa-table"></i> </span>
					<h2>车辆状态[客户]</h2>
				</header>
				<div>
					<div class="widget-body no-padding">
						<div class="page-header clearfix s_table_opreation">
							<div class="left page-header-btn">
								<div class="top_module ">
									<span class="module_text">公司名称</span>
									<sa-company-tree companyTreeId="companyTree" (companySelected)="companySelected($event)"></sa-company-tree>
								</div>
								<div class="top_module top_module_box">
									<span class="top_module_label module_text">车辆分类
									</span><select class="top_module_select select2" id="TcarTypeSelect2" name="carUseType" select2>
										<option value="">全部</option>
										<optgroup *ngFor="let item of carTypeList" [label]="item.label">
											<option *ngFor="let lis of item.children" [value]='lis.id'>{{lis.label}}</option>
										</optgroup>
									</select>
								</div>

								<!--<div class="selectDate top_module">
									<table-select-date [notInit]='true' (outerTime)="getSelectTableTime($event)" ></table-select-date>
								</div>-->
								<div class="top_module top_module_box">
									<span class="top_module_label module_text">排序</span>
									<select name="" class="top_module_select" [(ngModel)]="sortType" (change)="sortChange()">
										<option value="">默认</option>
										<option value="1">重量升序</option>
										<option value="2">重量降序</option>
										<option value="3">版本号升序</option>
										<option value="4">版本号降序</option>
										<option value="5">重量时间升序</option>
										<option value="6">重量时间降序</option>
									</select>
								</div>
								<div class="top_module top_module_box">
									<span class="top_module_label module_text">到期状态</span>
									<select name="" class="top_module_select" [(ngModel)]="state" (change)="sortChange()">
										<option value="0">全部</option>
										<option value="1">未到期</option>
										<option value="2">已到期</option>
									</select>
								</div>
								<div class="top_module top_module_box">
									<span class="top_module_label module_text">在线状态</span>
									<select name="" class="top_module_select" [(ngModel)]="online" (change)="sortChange()">
										<option value="0">全部</option>
										<option value="1">在线</option>
										<option value="2">离线</option>
									</select>
								</div>
								<!-- <div class="inline_block" style="vertical-align: middle;">
									<label class="checkbox-inline" style="font-size: 14px;height:28px;line-height: 28px;vertical-align: middle;">
							      <input type="checkbox" class="checkbox" (change)="isOnline($event.target.checked)">
							      <span>在线</span>
						      </label>
								</div> -->
								<button class="btn btn-primary" (click)="table_search()" style="margin-left: 8px;">查询</button>
								<button type="button" *ngIf="isShowDeviceDetail" class="btn btn-primary s_btn_fix" (click)="deviceDetail('btn',deviceDetailModal)">设备详情</button>
								<button type="button" *ngIf="isShowParameter" class="btn btn-primary s_btn_fix" (click)="paramConfig(paramConfigModal)">参数配置</button>
								<button type="button" *ngIf="isShowExport" class="btn btn-primary" (click)="exportData()">导出</button>
							</div>
							<div class="right top-search">
								<input type="text" [(ngModel)]="searchKey" (change)="table_search()" class="search-input" placeholder="设备ID、车牌号...">
								<span class="top-search-box">
									<button class="top-search-btn" type="button" (click)="table_search()"> <i class="fa fa-search"></i></button>
								</span>
							</div>
						</div>
						<div class="table_scroll">
							<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
								<thead>
									<tr>
										<th>
											<div class="checkbox" style="margin:0;left: 5px;text-align: center;">
												<label>
													<input type="checkbox" class="checkbox style-0" [(ngModel)]="allChecked" (click)="allSelected()">
													<span></span>
												</label>
											</div>
										</th>
										<th *ngIf="isShowDeviceDetail">操作</th>
										<th>车牌号</th>
										<th>设备ID</th>
										<th>重量(吨)</th>
										<th>车辆分类</th>
										<th>重量时间</th>
										<th>坐标</th>
										<th>GPS时间</th>
										<th>状态</th>
										<th>软件版本</th>
										<th>硬件版本</th>
										<!-- <th>固件版本</th> -->
										<!-- <th>系数</th> -->
										<th>安装时间</th>
										<th>到期时间</th>
										<th>备注</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of tableData; let i = index" [attr.data-index]="i" [ngClass]='{selected: row.isChecked }' (click)="singleRowSelected(row,$event,i)">
										<td class="checkbox-td">
											<div class="checkbox" style="margin:0;left: 5px;text-align: center;">
												<label class="checkbox-label">
													<input type="checkbox" class="checkbox style-0" [(ngModel)]="row.isChecked" (click)='rowSelected(row,$event,i)'>
													<span class="checkbox-flag"></span>
												</label>
											</div>
										</td>
										<td *ngIf="isShowDeviceDetail">
											<button type="button" (click)='deviceDetail(row,deviceDetailModal)'>详情</button>
										</td>
										<td>{{row.carNumber}}</td>
										<td>
											<span>{{row.deviceId}}</span>
											<!--<span class="frequency" *ngIf="row.frequency>1" title="频率">{{row.frequency}}</span>-->
											<!--<span *ngIf="row.autoReset"><img src="assets/img/robot.png"/></span>-->
										</td>
										<td>{{row.weight}}</td>
										<td>{{row.useTypeL2}}</td>
										<td>{{row.carUploadDate}}</td>
										<td>
											<span *ngIf="row.x">{{row.x}},</span><span>{{row.y}}</span>
										</td>
										<td>
											<span [ngClass]="{'red bold':row.isShowGPSAlert}">{{row.gpsUploadDate}}</span>
										</td>
										<td>
											<span *ngIf="row.runStatus === '0'" class="red">离线<span *ngIf="row.alarmType == '2'||row.alarmType == '1'">[断电中]</span><span *ngIf="row.alarmType == '0'">[未知原因]</span><span *ngIf="row.alarmType == '3'">[异常断电]</span></span>
											<span *ngIf="row.runStatus === '1'" class="green">在线</span>
											<span *ngIf="!(row.runStatus === '1'||row.runStatus === '0')" class="green">{{row.runStatus}}</span>
										</td>
										<td>
											<span>{{row.version}}</span>
											<!--<span *ngIf="row.version" class="versionInfo" (click)="versionUpdataDetail(row,versionUpdataInfoModal)">
												<i class="fa fa-question-circle" title="点击查看版本升级信息" style="color: #1A6DDD;font-size: 14px;cursor: pointer;"></i>
											</span>-->
										</td>
										<td>{{row.hwVersion}}</td>
										<!-- <td>{{row.fwVersion}}</td> -->
										<!-- <td>
											<span *ngIf='row.coef.length >0'>
												<span>[</span><span *ngFor="let lis of row.coef;let i = index;">
													<span style="font-weight: bold;">CH{{lis.index}}:</span><span>{{lis.value}}<span *ngIf="i < row.coef.length-1">,</span></span>
												</span><span>]</span>
											</span> -->
										<!--<span *ngIf="row.coef.length >0" class="versionInfo" (click)="coefUpdataDetail(row,coefUpdataInfoModal)">
												<i class="fa fa-question-circle" title="点击查看系数设置日志信息" style="color: #1A6DDD;font-size: 14px;cursor: pointer;"></i>
											</span>-->
										<!-- </td> -->
										<td>{{row.installTime}}</td>
										<td>
											<span class="red" *ngIf="row.isExpire">{{row.renewalDueTime}}</span>
											<span *ngIf="!row.isExpire">{{row.renewalDueTime}}</span>
										</td>
										<td>{{row.remark}}</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="table-fix clearfix">
							<paginator [totalRecords]="totalCount" [rows]="pageSize" [currentPage]="curPage - 1" (onPageChange)="paginate($event)">
							</paginator>
							<button type="button" class="btn default refresh_btn" (click)="refresh()"><i class="fa fa-refresh"></i></button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</sa-widgets-grid>

	<!-- 设备详情信息    弹窗-->
	<div bsModal #deviceDetailModal="bs-modal" id="deviceDetailModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true" style="overflow: auto;">
		<div class="modal-dialog modal-lg" style="width: 1000px;">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" (click)="cancelDeviceDetail(deviceDetailModal)" aria-label="Close"><span aria-hidden="true">&times;</span></button>
					<h4 class="modal-title">设备信息
						<span *ngIf="isShowGPSAlert" class="red  gps-alert">GPS更新异常</span>
					</h4>
					<div class="btn-group" style="position: absolute;right: 88px;top: 8px;">
						<button class="btn btn-default no-margin" [ngClass]="{'btn-primary':btnGroupActive == '1'}" (click)="selectTimeFast('1')">一周</button>
						<!--<button class="btn btn-default no-margin" [ngClass]="{'btn-primary':btnGroupActive == '2'}" (click)="selectTimeFast('2')">半个月</button>-->
						<button class="btn btn-default no-margin" [ngClass]="{'btn-primary':btnGroupActive == '3'}" (click)="selectTimeFast('3')">一个月</button>
						<!--<button class="btn btn-default no-margin" [ngClass]="{'btn-primary':btnGroupActive == '4'}" (click)="selectTimeFast('4')">两个月</button>-->
						<button class="btn btn-default no-margin" [ngClass]="{'btn-primary':btnGroupActive == '5'}" (click)="selectTimeFast('5')">三个月</button>
						<button class="btn no-margin btn-default" [ngClass]="{'btn-primary':btnGroupActive == '6'}" (click)="selectTimeFast('6')">半年</button>
						<button class="btn no-margin btn-default" [ngClass]="{'btn-primary':btnGroupActive == '7'}" (click)="selectTimeFast('7')">全部</button>
					</div>
				</div>
				<div class="modal-body" style="padding: 20px;">
					<div class="row form-horizontal">
						<div>
							<div class="tabbable">
								<ul class="nav nav-tabs" id="myTab" style="padding-left:12px;background-image: linear-gradient(#F1F5FD, #E9F0FF);">
									<li *ngIf="isShowDeviceInfo" class="s-lis all"><a data-toggle="tab" href="#all" (click)="getTabData('');">设备信息</a></li>
									<li *ngIf="isShowRepairInfo" class="s-lis waitRepaired"><a data-toggle="tab" href="#waitRepaired" (click)="getTabData('4_1');">待维修
											<span class="orange">{{repairedDeviceInfo.waitFixedCount}}</span></a>
									</li>
									<li *ngIf="isShowRepairInfo" class="s-lis repaired"><a data-toggle="tab" href="#repaired" (click)="getTabData('4_2');">已维修
											<span class="green">{{repairedDeviceInfo.fixedCount}}</span></a>
									</li>
									<li *ngIf="isShowDataInfo" class="s-lis question"><a data-toggle="tab" href="#question" (click)="getTabData('1');">问题记录
											<span class="red">{{questionRecordTotal}}</span></a>
									</li>
									<li *ngIf="isShowDataInfo" class="s-lis dataWaitFix"><a data-toggle="tab" href="#dataWaitFix" (click)="getTabData('2_1');">数据待修复
											<span class="orange">{{dataFixInfo.exceptionOrderCount}}</span></a>
									</li>
									<li *ngIf="isShowDataInfo" class="s-lis dataFix"><a data-toggle="tab" href="#dataFix" (click)="getTabData('2');">数据修复
											<span class="green" *ngIf="dataFixInfo.dataFixCount == 0 || dataFixInfo.dataFixCount">{{dataFixInfo.dataFixCount + dataFixInfo.truckFixCount}}</span></a>
									</li>

									<li *ngIf="isShowAlarmInfo" class="s-lis lis-alert"><a data-toggle="tab" href="#alert" (click)="getTabData('3');">警报记录
											<span class="red" *ngIf="alertDataInfo.shutDownCount == 0 || alertDataInfo.shutDownCount">{{alertDataInfo.shutDownCount + alertDataInfo.offLineCount + alertDataInfo.shutDownExceptionCount}}</span></a>
									</li>
									<li *ngIf="isShowFirmwareInfo" class="s-lis version"><a data-toggle="tab" href="#version" (click)="getTabData('5');">固件升级 <span class="status-purple"></span></a></li>
									<li *ngIf="isShowFirmwareInfo" class="s-lis coef"><a data-toggle="tab" href="#coef" (click)="getTabData('6');">系数升级 <span class="status-purple"></span></a></li>
								</ul>
								<div class="tab-content" style="padding:0;border:none">
									<div id="all" class="tab-pane">
										<sa-device-info [deviceId]="selectRowData.deviceId" [endTime]="endDateBtn" [startTime]="startDateBtn" [iccid]="deviceBaseInfo.iccid"></sa-device-info>
										<!-- <div class="device-module clearfix">
											<h4>基本信息</h4>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">公司名称</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.companyName||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">车辆用途</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.userTypeName||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">司机姓名</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.driverName||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">车牌号码</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.carNumber||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding">
												<span class="item-key">传感器类型</span><span class="item-value" [attr.title]="">
													<sa-sensor-type [sensorTypeId]="deviceBaseInfo.sensorType" type='2'></sa-sensor-type>
												</span>
											</div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">司机电话</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.phone||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">设备ID</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.deviceId||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">产品编码</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.productNo||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">录入人员</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.userNameForCreate||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">硬件版本</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.hwVersion||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">SIM卡号</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.iccid||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">安装时间</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.inputDate||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">传感器通道</span><span class="item-value table_scroll" [attr.title]="">
												<span  class="channel-style bg-green" *ngFor="let item of deviceBaseInfo.sensorChannel">{{item}}</span>
												<span *ngIf="deviceBaseInfo.sensorChannel.length == 0">--</span>
											</span></div>
											<div class="item-box col-xs-4 no-padding">
												<span class="item-key">当前系数</span><span class="item-value" [attr.title]="deviceBaseInfo.coef">
													<span *ngIf='deviceBaseInfo.coefT.length >0'>
														<span>[</span><span *ngFor="let lis of deviceBaseInfo.coefT;let i = index;">
															<span style="font-weight: bold;">CH{{lis.index}}:</span><span>{{lis.value}}<span *ngIf="i < deviceBaseInfo.coefT.length-1">,</span></span>
														</span><span>]</span>
													</span>
													<span *ngIf='deviceBaseInfo.coefT.length == 0'>--</span>
												</span>
											</div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">算法版本</span><span class="item-value" [attr.title]="deviceBaseInfo.version">{{deviceBaseInfo.version||'--'}}</span></div>
										</div>
										<div class="device-module clearfix">
											<h4>问题记录<span style="font-weight: normal;"> [{{btnGroupActiveText}}]</span></h4>
											<div class="item-box col-xs-4 no-padding" *ngFor="let item of questionRecordInfo"><span class="item-key">{{item.reason}}</span><span class="item-value jump-number">{{item.reasonCount}}</span></div>
										</div>
										<div class="device-module clearfix">
											<h4>数据修复<span style="font-weight: normal;"> [{{btnGroupActiveText}}]</span></h4>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">数据修复</span><span class="item-value jump-number">{{dataFixInfo.dataFixCount}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">轨迹修复</span><span class="item-value jump-number">{{dataFixInfo.truckFixCount}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">待修复[矩阵]</span><span class="item-value jump-number">{{dataFixInfo.exceptionOrderCount}}</span></div>
										</div>
										<div class="device-module clearfix">
											<h4>警报记录<span style="font-weight: normal;"> [{{btnGroupActiveText}}]</span></h4>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">断电警报</span><span class="item-value jump-number">{{alertDataInfo.shutDownCount}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">离线警报</span><span class="item-value jump-number">{{alertDataInfo.offLineCount}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">异常断电警报</span><span class="item-value jump-number">{{alertDataInfo.shutDownExceptionCount}}</span></div>
										</div>
										<div class="device-module clearfix">
											<h4>维修记录<span style="font-weight: normal;"> [{{btnGroupActiveText}}]</span></h4>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">待维修记录</span><span class="item-value jump-number">{{repairedDeviceInfo.waitFixedCount}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">已维修记录</span><span class="item-value jump-number">{{repairedDeviceInfo.fixedCount}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">最新维修时间</span><span class="item-value">{{repairedDeviceInfo.lastRepariedTime||'--'}}</span></div>
										</div>
										<div class="device-module clearfix">
											<h4>设备状态</h4>
											<div class="item-box col-xs-4 no-padding">
												<span class="item-key">在线状态</span><span class="item-value">
													<span *ngIf="deviceRealTimeDataInfo.runStatus == '1'" class="green">在线</span><span class="red" *ngIf="deviceRealTimeDataInfo.runStatus == '0'">离线</span><span *ngIf="!deviceRealTimeDataInfo.runStatus">--</span>
												</span>
											</div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">设备电压</span><span class="item-value">{{deviceRealTimeDataInfo.voltage||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding">
												<span class="item-key">警报类型</span><span class="item-value">
													<span *ngIf="deviceRealTimeDataInfo.alarmType == '0'||!deviceRealTimeDataInfo.alarmType">无警报</span><span *ngIf="deviceRealTimeDataInfo.alarmType == '2'" class="red">
														离线警报</span><span *ngIf="deviceRealTimeDataInfo.alarmType == '1'" class="red">断电警报
														</span>
												</span>
											</div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">更新时间</span><span class="item-value">{{deviceRealTimeDataInfo.updateTime||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">采集时间</span><span class="item-value">{{deviceRealTimeDataInfo.voltageTime||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">警报时间</span><span class="item-value"><span class="red" *ngIf="deviceRealTimeDataInfo.alarmTime">{{deviceRealTimeDataInfo.alarmTime}}</span><span *ngIf="!deviceRealTimeDataInfo.alarmTime">--</span></span></div>

										</div>
										<span *ngIf="isShowOfflineAlert" class="red offline-alert left">异常离线[磅单数:{{weightCount}}][离线时长:{{offlineDiffTime}}]</span> -->
									</div>
									<div id="question" class="tab-pane">
										<div class="table_scroll">
											<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
												<thead>
													<tr>
														<th>录入人员</th>
														<th>录入时间</th>
														<th>设备ID</th>
														<th>车牌号</th>
														<th>版本</th>
														<th>问题分类</th>
														<th>现象分类</th>
														<th>问题原因</th>
														<th>车辆用途</th>
														<th>用途分类</th>
														<th>开始时间</th>
														<th>结束时间</th>
														<th>系数</th>
														<th>状态</th>
														<th>审核人员</th>
														<th>审核时间</th>
														<th>备注</th>

													</tr>
												</thead>
												<tbody>
													<tr *ngFor="let row of tableDataTab1; let i = index" [attr.data-index]="i">
														<td>{{row.createUserName}}</td>
														<td>{{row.createDate}}</td>
														<td>{{row.deviceId}}</td>
														<td>{{row.carNumber}}</td>
														<td>{{row.version}}</td>
														<td>{{row.exceptionType}}</td>
														<td>{{row.programType}}</td>
														<td>{{row.reason}}</td>
														<td>{{row.useTypeL1}}</td>
														<td>{{row.useTypeL2}}</td>
														<td>{{row.startDate}}</td>
														<td>{{row.endDate}}</td>
														<td>
															<span *ngIf='row.coef.length >0'>
																<span>[</span><span *ngFor="let lis of row.coef;let i = index;">
																	<span style="font-weight: bold;">CH{{lis.index}}:</span><span>{{lis.value}}<span *ngIf="i < row.coef.length-1">,</span></span>
																</span><span>]</span>
															</span>
														</td>
														<td>
															<span *ngIf='row.isCheck=="1"' class="green">审核通过</span>
															<span *ngIf='row.isCheck=="0"' class="orange">未审核</span>
														</td>
														<td>{{row.userNameForCheck}}</td>
														<td>{{row.checkDate}}</td>
														<td>{{row.remark}}</td>
													</tr>
												</tbody>
											</table>
										</div>
										<div class="table-fix clearfix">
											<paginator [totalRecords]="totalCountTab" [rows]="pageSizeTab" [currentPage]="curPageTab - 1" (onPageChange)="paginateTab($event)">
											</paginator>
											<button type="button" class="btn default refresh_btn" (click)="refreshTab()"><i class="fa fa-refresh"></i></button>
										</div>
									</div>
									<div id="dataFix" class="tab-pane">
										<div class="table_scroll">
											<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
												<thead>
													<tr>
														<th>用户名</th>
														<th>记录类型</th>
														<th>车牌号码</th>
														<th>记录时间</th>
														<th>内容</th>
													</tr>
												</thead>
												<tbody>
													<tr *ngFor="let row of tableDataTab2; let i = index" [attr.data-index]="i">
														<td>{{row.userName}}</td>
														<td>
															<span *ngIf="row.operation=='1'">数据修复</span>
															<span *ngIf="row.operation=='2'">轨迹修复</span>
														</td>
														<td>{{row.carNumber}}</td>
														<td>{{row.createTime}}</td>
														<td>{{row.content}}</td>
													</tr>
												</tbody>
											</table>
										</div>
										<div class="table-fix clearfix">
											<paginator [totalRecords]="totalCountTab" [rows]="pageSizeTab" [currentPage]="curPageTab - 1" (onPageChange)="paginateTab($event)">
											</paginator>
											<button type="button" class="btn default refresh_btn" (click)="refreshTab()"><i class="fa fa-refresh"></i></button>
										</div>
									</div>
									<div id="dataWaitFix" class="tab-pane">
										<div class="table_scroll">
											<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
												<thead>
													<tr>
														<th>订单编号</th>
														<th>车牌号码</th>
														<th>设备ID</th>
														<th>空车过磅时间</th>
														<th>重车过磅时间</th>
														<th>净重</th>
														<th>订单类型</th>
														<th>开始卸货时间</th>
														<th>卸货结束时间</th>
														<th>异常描述</th>
														<th>推送时间</th>
														<th>推送状态</th>
														<th>处理人</th>
														<th>状态</th>
														<th>录入时间</th>
														<th>更新时间</th>
													</tr>
												</thead>
												<tbody>
													<tr *ngFor="let row of tableDataTab2_1; let i = index" [attr.data-index]="i">
														<td>{{row.taskId}}</td>
														<td>{{row.carNumber}}</td>
														<td>{{row.deviceId}}</td>
														<td>{{row.emptyLoadDate}}</td>
														<td>{{row.fullLoadDate}}</td>
														<td>{{row.weight}}</td>
														<td>
															<span *ngIf="row.type == '1'">水泥订单</span>
															<span *ngIf="row.type == '2'">物资订单</span>
														</td>
														<td>{{row.unloadStartDate}}</td>
														<td>{{row.unloadEndDate}}</td>
														<td>{{row.remark}}</td>
														<td>{{row.pushDate}}</td>
														<td>
															<span *ngIf="row.isPush=='0'" class="orange">未推送</span>
															<span *ngIf="row.isPush=='1'" class="green">已推送</span>
														</td>
														<td>{{row.userName}}</td>
														<td>
															<span *ngIf="row.status=='0'" class="orange">待处理</span>
															<span *ngIf="row.status=='1'" class="green">已处理</span>

														</td>
														<td>{{row.createTime}}</td>
														<td>{{row.uploadTime}}</td>
													</tr>
												</tbody>
											</table>
										</div>
										<div class="table-fix clearfix">
											<paginator [totalRecords]="totalCountTab" [rows]="pageSizeTab" [currentPage]="curPageTab - 1" (onPageChange)="paginateTab($event)">
											</paginator>
											<button type="button" class="btn default refresh_btn" (click)="refreshTab()"><i class="fa fa-refresh"></i></button>
										</div>
									</div>
									<div id="alert" class="tab-pane">
										<div class="table_scroll">
											<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
												<thead>
													<tr>
														<th>设备ID</th>
														<th>车牌号</th>
														<th>所属公司</th>
														<th>异常信息</th>
														<th>关机时长</th>
														<th>关机时间</th>
														<th>开机时间</th>
														<th>地址</th>
														<th>状态</th>
														<th>处理意见</th>
													</tr>
												</thead>
												<tbody>
													<tr *ngFor="let row of tableDataTab3; let i = index" [attr.data-index]="i">
														<td>{{row.deviceId}}</td>
														<td>{{row.carNumber}}</td>
														<td>{{row.companyName}}</td>
														<td>{{row.message}}</td>
														<td>
															<span *ngIf="row.type == 1">
																<span *ngIf="!row.onTime||row.totalSecond =='0秒'">离线中</span>
																<span *ngIf="row.totalSecond&&row.onTime">{{row.totalSecond}}</span>
															</span>
															<span *ngIf="row.type == 2">
																<span *ngIf="!row.onTime||row.totalSecond =='0秒'">断电中</span>
																<span *ngIf="row.totalSecond&&row.onTime">{{row.totalSecond}}</span>
															</span>
															<span *ngIf="row.type == 3">
																<span *ngIf="!row.onTime||row.totalSecond =='0秒'">无</span>
																<span *ngIf="row.onTime&&row.totalSecond">{{row.onTime}}</span>
															</span>
														</td>
														<td>{{row.offTime}}</td>
														<td>
															<span *ngIf="row.type == 1">
																<span *ngIf="!row.onTime||row.totalSecond =='0秒'">离线中</span>
																<span *ngIf="row.onTime&&row.totalSecond">{{row.onTime}}</span>
															</span>
															<span *ngIf="row.type == 2">
																<span *ngIf="!row.onTime||row.totalSecond =='0秒'">断电中</span>
																<span *ngIf="row.onTime&&row.totalSecond">{{row.onTime}}</span>
															</span>
															<span *ngIf="row.type == 3">
																<span *ngIf="!row.onTime||row.totalSecond =='0秒'">无</span>
																<span *ngIf="row.onTime&&row.totalSecond">{{row.onTime}}</span>
															</span>

														</td>
														<td>{{row.address}}</td>
														<td>
															<span *ngIf="row.handleStatus == 0" class="orange">未处理</span>
															<span *ngIf="row.handleStatus == 1" class="green">已处理</span>
														</td>
														<td>{{row.addvice}}</td>
													</tr>
												</tbody>
											</table>
										</div>
										<div class="table-fix clearfix">
											<paginator [totalRecords]="totalCountTab" [rows]="pageSizeTab" [currentPage]="curPageTab - 1" (onPageChange)="paginateTab($event)">
											</paginator>
											<button type="button" class="btn default refresh_btn" (click)="refreshTab()"><i class="fa fa-refresh"></i></button>
										</div>
									</div>
									<div id="waitRepaired" class="tab-pane">
										<div class="table_scroll">
											<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
												<thead>
													<tr>
														<th>故障状态</th>
														<th>进厂限制</th>
														<th>录入人员</th>
														<th>录入时间</th>
														<th>故障类型</th>
														<th>故障现象</th>
														<th>故障时间</th>
														<th>维修指导</th>
														<th>故障来源</th>
														<th>备注</th>
														<th>最后编辑</th>
														<th>操作</th>
													</tr>
												</thead>
												<tbody>
													<tr *ngFor="let row of tableDataTab4_1">
														<td>
															<span *ngIf='row.repairedStatus=="0"' class="orange">待维修</span>
															<span *ngIf='row.repairedStatus=="1"' class="green">已维修</span>
														</td>
														<td>
															<span *ngIf="row.isPush=='1'">限制</span>
															<span *ngIf="row.isPush=='0'">不限制</span>
														</td>
														<td>{{row.creater}}</td>
														<td>{{row.createTime}}</td>
														<td>{{row.faultTypeName}}</td>
														<td>{{row.faultPhenomenon}}</td>
														<td>{{row.faultTime}}</td>
														<td>{{row.repairedGuide}}</td>
														<td>{{row.updateSource}}</td>
														<td>{{row.remark}}</td>
														<td>{{row.lastUpdateTime}}</td>
														<td><button type="button" (click)="deleteRepaireRow(row)">删除</button></td>
													</tr>
												</tbody>
											</table>
										</div>
										<div class="table-fix clearfix">
											<paginator [totalRecords]="totalCountTab" [rows]="pageSizeTab" [currentPage]="curPageTab - 1" (onPageChange)="paginateTab($event)">
											</paginator>
											<button type="button" class="btn default refresh_btn" (click)="refreshTab()"><i class="fa fa-refresh"></i></button>
										</div>
									</div>
									<div id="repaired" class="tab-pane">
										<div class="table_scroll">
											<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
												<thead>
													<tr>
														<th>设备ID</th>
														<th>车牌号码</th>
														<th>用途分类</th>
														<th>公司名称</th>
														<th>维修人员</th>
														<th>维修订单创建时间</th>
														<th>维修时间</th>
														<th>故障现象</th>
														<th>维修内容</th>
														<th>维修细分</th>
														<th>维修编号</th>
														<th>维修费用[元]</th>
														<th>支付状态</th>
														<th>维修状态</th>
														<th>是否审核</th>
														<th>审核人员</th>
														<th>审核时间</th>
														<th>审核意见</th>
													</tr>
												</thead>
												<tbody>
													<tr *ngFor="let row of tableDataTab4_2">
														<td>{{row.deviceId}}</td>
														<td>{{row.carNumber}}</td>
														<td>{{row.useTypeL2}}</td>
														<td>{{row.companyName}}</td>
														<td>{{row.repairedUserName}}</td>
														<td>{{row.repairOrderCreateTime}}</td>
														<td>{{row.repairedTime}}</td>
														<td>{{row.faultPhenomenonList}}</td>
														<td>{{row.repairContentList}}</td>
														<td>{{row.repairSubdivideList}}</td>
														<td>{{row.repairedNumber}}</td>
														<td>
															<span>{{row.price/100}}</span>
														</td>
														<td>
															<span *ngIf="row.payStatus == 1">待支付</span>
															<span *ngIf="row.payStatus == 2">已支付</span>
															<span *ngIf="row.payStatus == 3">订单取消</span>
														</td>
														<td>
															<span class="green">已维修</span>
														</td>
														<td>
															<span *ngIf="row.auditStatus === 0" class="orange">未审核</span>
															<span *ngIf="row.auditStatus === 1" class="green">审核通过</span>
															<span *ngIf="row.auditStatus === 2" class="red">审核不通过</span>
														</td>
														<td>{{row.auditUser}}</td>
														<td>{{row.auditDate}}</td>
														<td>{{row.describe}}</td>
													</tr>
												</tbody>
											</table>
										</div>
										<div class="table-fix clearfix">
											<paginator [totalRecords]="totalCountTab" [rows]="pageSizeTab" [currentPage]="curPageTab - 1" (onPageChange)="paginateTab($event)">
											</paginator>
											<button type="button" class="btn default refresh_btn" (click)="refreshTab()"><i class="fa fa-refresh"></i></button>
										</div>
									</div>
									<div id="version" class="tab-pane">
										<div class="table_scroll">
											<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
												<thead>
													<tr>
														<th>用户名称</th>
														<th>设备ID</th>
														<th>车牌号</th>
														<th>操作内容</th>
														<th>升级状态</th>
														<th>版本名称</th>
														<th>版本号</th>
														<th>前版本号</th>
														<th>时间</th>
													</tr>
												</thead>
												<tbody>
													<tr *ngFor="let row of tableDataTab5">
														<td>{{row.userName}}</td>
														<td>{{row.deviceId}}</td>
														<td>{{row.carNumber}}</td>
														<td>{{row.content}}</td>
														<td>
															<span *ngIf="row.status ==='0'" style="color: #ffb752;">等待升级</span>
															<span *ngIf="row.status ==='2'" style="color: #4cae4c;">升级成功</span>
														</td>
														<td>{{row.binName}}</td>
														<td>{{row.version}}</td>
														<td>{{row.prevVersion}}</td>
														<td>{{row.createTime}}</td>
													</tr>
												</tbody>
											</table>
										</div>
										<div class="table-fix clearfix">
											<paginator [totalRecords]="totalCountTab" [rows]="pageSizeTab" [currentPage]="curPageTab - 1" (onPageChange)="paginateTab($event)">
											</paginator>
											<button type="button" class="btn default refresh_btn" (click)="refreshTab()"><i class="fa fa-refresh"></i></button>
										</div>
									</div>
									<div id="coef" class="tab-pane">
										<div class="table_scroll">
											<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
												<thead>
													<tr>
														<th>操作人</th>
														<th>设置时间</th>
														<th>应答时间</th>
														<th>设置状态</th>
														<th>下发系数</th>
														<th>前系数</th>
														<th>创建时间</th>
														<th>更新时间</th>
														<th>设备ID</th>
														<th>车牌号码</th>
														<th>公司名称</th>
													</tr>
												</thead>
												<tbody>
													<tr *ngFor="let row of tableDataTab6">
														<td>{{row.userName}}</td>
														<td>{{row.sendTime}}</td>
														<td>{{row.ackTime}}</td>
														<td>
															<!-- 设置状态 type 	0：已提交	1：待下发	2：已下发	3：设置成功 -->
															<span [ngClass]="{'orange':row.type == 1,'grey':row.type == 2,'green':row.type == 3}">{{row.status}}</span>
														</td>
														<td>
															<span *ngIf='row.newCoef.length >0'>
																<span>[</span><span *ngFor="let lis of row.newCoef;let i = index;">
																	<span style="font-weight: bold;">CH{{lis.index}}:</span><span>{{lis.value}}<span *ngIf="i < row.newCoef.length-1">,</span></span>
																</span><span>]</span>
															</span>
														</td>
														<td>
															<span *ngIf='row.oldCoef.length >0'>
																<span>[</span><span *ngFor="let lis of row.oldCoef;let i = index;">
																	<span style="font-weight: bold;">CH{{lis.index}}:</span><span>{{lis.value}}<span *ngIf="i < row.oldCoef.length-1">,</span></span>
																</span><span>]</span>
															</span>
														</td>
														<td>{{row.createTime}}</td>
														<td>{{row.updateTime}}</td>
														<td>{{row.deviceId}}</td>
														<td>{{row.carNumber}}</td>
														<td>{{row.companyName}}</td>
													</tr>
												</tbody>
											</table>
										</div>
										<div class="table-fix clearfix">
											<paginator [totalRecords]="totalCountTab" [rows]="pageSizeTab" [currentPage]="curPageTab - 1" (onPageChange)="paginateTab($event)">
											</paginator>
											<button type="button" class="btn default refresh_btn" (click)="refreshTab()"><i class="fa fa-refresh"></i></button>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!--设备详情信息  end-->

	<!-- 参数配置    弹窗-->
	<div bsModal #paramConfigModal="bs-modal" id="paramConfigModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
		<div class="modal-dialog modal-lg">
			<div class="modal-content" style="width:780px">
				<div class="modal-header">
					<button type="button" class="close" (click)="cancelparamConfig(paramConfigModal)" aria-label="Close"><span aria-hidden="true">&times;</span></button>
					<h4 class="modal-title">参数配置</h4>
				</div>
				<div class="modal-body">
					<div class="row form-horizontal" style="margin-left:20px">
						<div class="row_module" style="margin:8px 0;">
							<div class="line">
								<div class="s_cell">
									<div class="s_text">上传频率[秒]</div>
									<input type="number" class="s_input" [(ngModel)]="config.upload" />
								</div>
								<button type="button" class="btn btn-primary ms-btn" (click)="outputUpload()">读</button>
								<button type="button" class="btn btn-primary ms-btn" (click)="inputUpload()">写</button>
							</div>
						</div>
						<div class="row_module">
							<div class="row_title">设备版本</div><button type="button" class="btn btn-primary ms-btn" (click)="outputDeviceVersion()">读</button>
							<div class="line">
								<div class="s_cell">
									<div class="s_text">硬件版本</div>
									<input type="text" class="s_input" [(ngModel)]="config.binVersion" />
								</div>
								<div class="s_cell">
									<div class="s_text">固件版本</div>
									<input type="text" class="s_input" [(ngModel)]="config.algorithmVersion" />
								</div>
								<div class="s_cell">
									<div class="s_text">BootLoader版本</div>
									<input type="text" class="s_input" [(ngModel)]="config.bootLoaderVersion" />
								</div>
							</div>
						</div>
						<div class="row_module">
							<div class="row_title">GPS信息</div><button type="button" class="btn btn-primary ms-btn" (click)="outputGPS()">读</button>
							<div class="line">
								<div class="s_cell">
									<div class="s_text">经度</div>
									<input type="text" class="s_input" [(ngModel)]="config.longitude" />
								</div>
								<div class="s_cell">
									<div class="s_text">纬度</div>
									<input type="text" class="s_input" [(ngModel)]="config.latitude" />
								</div>
								<div class="s_cell">
									<div class="s_text">车速[KM/H]</div>
									<input type="text" class="s_input" [(ngModel)]="config.speed" />
								</div>
							</div>
							<div class="line">
								<div class="s_cell">
									<div class="s_text">方位角</div>
									<input type="text" class="s_input" [(ngModel)]="config.azimuth" />
								</div>
								<div class="s_cell">
									<div class="s_text">有效卫星数</div>
									<input type="text" class="s_input" [(ngModel)]="config.GPSstrength" />
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="modal-footer" style="text-align: left;">
					<button type="button" class="btn btn-default" (click)="cancelparamConfig(paramConfigModal)" style="float: right;">关闭</button>
				</div>
			</div>
		</div>
	</div>
	<!--参数配置end-->
</div>